﻿using System.Collections.Generic;
using System.Threading.Tasks;
using BCEntity.TMS.Driver.DriverLearnDatum;

namespace BCData.TMS.Driver.DriverLearnDatum
{
    /// <summary>
    /// 司机学习资料答案
    /// </summary>
    public interface IDriverLearnDatumAnswerData
    {
        /// <summary>
        /// 新增司机学习资料答案
        /// </summary>
        /// <param name="entity">司机学习资料答案</param>
        /// <returns></returns>
        Task<int> InsertAsync(DriverLearnDatumAnswerEntity entity);
        /// <summary>
        /// 修改司机学习资料答案
        /// </summary>
        /// <param name="entity">司机学习资料答案</param>
        /// <returns></returns>
        Task<DriverLearnDatumAnswerEntity> UpdateAsync(DriverLearnDatumAnswerEntity entity);
        /// <summary>
        /// 删除司机学习资料答案
        /// </summary>
        /// <param name="DatumAnswerId">学习资料答案Id</param>
        /// <returns></returns>
        Task<bool> DeleteAsync(int DatumAnswerId);
        /// <summary>
        /// 获取指定的一条学习资料答案
        /// </summary>
        /// <param name="DatumAnswerId">学习资料答案Id</param>
        /// <returns></returns>
        Task<DriverLearnDatumAnswerEntity> GetDriverLearnDatumAnswerByIdAsync(int DatumAnswerId);
        /// <summary>
        /// 分页查询司机学习资料答案
        /// </summary>
        /// <param name="pageIndex">分页页码</param>
        /// <param name="pageSize">分页页数</param>
        /// <param name="answerContent">学习资料答案内容</param>
        /// <returns></returns>
        Task<(IEnumerable<DriverLearnDatumAnswerEntity>, int)> GetDriverLearnDatumAnswersAsync(int pageIndex, int pageSize, string answerContent);
        /// <summary>
        /// 检查学习资料答案是否存在
        /// </summary>
        /// <param name="DatumAnswerId">学习资料答案Id</param>
        /// <returns></returns>
        Task<bool> CheckExistsByIdAsync(long DatumAnswerId);
        /// <summary>
        /// 批量删除学习资料答案
        /// </summary>
        /// <param name="datumAnswerIds">学习资料答案Id列表</param>
        /// <returns></returns>
        Task<int> DeleteByDatumAnswerIdsAsync(int[] datumAnswerIds);
    }
}
